<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <link rel="stylesheet" href="css/bootstrap.min.css" />
    <link rel="stylesheet" href="css/index.css" />
    <script src="js/jquery-3.4.1.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/index.js"></script>
    <title>cnode</title>
</head>

<body>
    <div class="content">
        <!-- 上面的navbar -->
        <div id="header"></div>
        <!-- 下面的主体部分 -->
        <div class="main">
            <!-- 主体的文章部分 -->
            <div class="maincontent">
                <!-- 上面的标题部分 -->
                <div class="maintitle">
                    <ul class="nav nav-tabs maintitul row" id="maintitleuul">
                        <li role="presentation" class="col-lg-offset-1">
                            <a href="javascript:void(0)" class="maintita" id="all">全部</a>
                        </li>
                        <li role="presentation">
                            <a href="javascript:void(0)" class="maintita" id="good">精华</a>
                        </li>
                        <li role="presentation">
                            <a href="javascript:void(0)" class="maintita" id="share">分享</a
                >
              </li>
              <li role="presentation">
                <a href="javascript:void(0)" class="maintita" id="ask">问答</a>
                        </li>
                        <li role="presentation">
                            <a href="javascript:void(0)" class="maintita" id="job">招聘</a>
                        </li>
                        <li role="presentation">
                            <a href="javascript:void(0)" class="maintita" id="dev">客户端测试</a
                >
              </li>
            </ul>
          </div>
          <!-- 文章的具体内容 -->
          <div class="mainartcile" id="titlecell"></div>
          <!-- 分页的具体内容 -->
          <div class="setpage">
            <nav aria-label="Page navigation">
              <ul class="pagination" id="setpage">
                <li><a class="prepagenum">首页</a></li>
                        <li>
                            <a href="#" aria-label="Previous">
                                <span aria-hidden="true">&laquo;</span>
                            </a>
                        </li>
                        <li>
                            <span class="pagenum" name="1">1</span>
                        </li>
                        <li>
                            <span class="pagenum" name="2">2</span>
                        </li>
                        <li><span class="pagenum" name="3">3</span></li>
                        <li><span class="pagenum" name="4">4</span></li>
                        <li><span class="pagenum" name="5">5</span></li>
                        <li>
                            <span aria-label="Next">
                    <span aria-hidden="true">&raquo;</span>
                            </span>
                        </li>
                        <li><a class="behpage">尾页</a></li>
                    </ul>
                    </nav>
                </div>
            </div>
            <!-- 小屏幕隐藏的slidebar -->
            <div class="silders">
                {{#if userMsg}}
                <div class="personBar slidebar ">
                    <p class="title">个人信息</p>
                    <div style="padding: 0 10px;">
                        {{#if userMsg.avatar_url}}
                        <img src="avatar/{{userMsg.avatar_url}}" alt="" width="100" style="margin-right: 10px;" /> {{else}} <img src="img/index/timg.jpg" alt="" /> {{/if}}
                        <span>{{userMsg.user_name}}</span>
                    </div>
                    <div style="padding: 20px;">
                        {{#if userMsg.sign}}
                        <p>"{{userMsg.sign}}"</p>
                        {{else}}
                        <p>"这家伙很懒，什么个性签名都没留下"</p>
                        {{/if}}
                    </div>
                </div>
                <div class="slidebar" style="height: 60px; line-height: 60px; padding-left: 10px;">
                    <a href="editTopic"><button type="button" class="btn btn-success">
                发布话题
              </button></a
            >
          </div>
          {{else}}
          <div class="slidebar">
            <p class="title">CNode：Node.js专业中文社区</p>
            <p>
              您可以<a href="login.html">登录</a>或者<a href="">注册</a
              >也可以<br />
            </p>
            <button class="github">
              <a href="https://github.com">通过github登录</a>
                    </button>
                </div>
                {{/if}}
            </div>
        </div>
    </div>
</body>
<script>
    $("#header").load("http://localhost:8686/header");
    // console.log(userMsg);
</script>

</html>